import React,{useState,useEffect} from 'react'
import {Wrapper} from './style'
import { PageHeader } from 'antd';
import { useNavigate} from 'react-router-dom'
import { CSSTransition } from 'react-transition-group'

export default function Eventdetail() {
  const navigate = useNavigate()
  const [show, setShow] = useState(false);
  useEffect(()=> {
    setShow(true)
    window.scrollTo(0,0)
},[])
  return (
    <CSSTransition
    in={show}
    timeout={300}
    appear={true}
    classNames="fly"
    unmountOnExit
    onExit={() => {
        navigate(-1)
    }}
    >
    <Wrapper>
       <PageHeader
        className="site-page-header"
        onBack={() => setShow(false)}
        subTitle="赛事详情页面"
       />
      <img src='https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6de2a9fb372d490ba42061305ad6a93a~tplv-k3u1fbpfcp-watermark.image?'/>
    </Wrapper>
    </CSSTransition>
  )
}
